#include "MinionAI.h"
#include "StatusComponent.h"

MinionAI::MinionAI( Pointer<Entity>& entity ) : IAI(entity)
{
	StatusComponent* component = (StatusComponent*)(entity->FindComponent(StatusComponent::type));
	m_speed = new ValueTrigger<int>(&(component->getStatus("Speed")));
}

void MinionAI::Update( float time, float timeChange )
{
	// States:
	// Engaged Target - aggressing a target
	// Moving - Moving to specific location

	switch (m_state)
	{
	case MOVING:
		{
			// Move in direction
			// pathfinder->getDirection();
			// m_velocity = direction * speed;
			// set velocity
			// set rotation * direction // (only move forward < hax)

			// Check should state change
			// 
			break;
		}
	case ENGAGED:
		{
			break;
		}
	}
}